home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / uupc.lzh / uupc / mlib.c < prev    next >
C/C++ Source or Header  |  1990-01-16  |  682b  |  41 lines

  1. /*
  2.  *    mlib.c
  3.  *
  4.  *    Amiga mailer library
  5.  *
  6.  *    Things to do in uu_host
  7.  *        serial I/O
  8.  *        directory routines {open,read,close}dir
  9.  *        prolog/epilog
  10.  *        system calls
  11.  *
  12.  *    $Id: mlib.c,v 1.2 90/01/16 10:26:48 crash Exp Locker: crash $
  13.  */
  14.  
  15. #ifndef lint
  16. static char RCSid[] = "$Id: mlib.c,v 1.2 90/01/16 10:26:48 crash Exp Locker: crash $";
  17. #endif /* lint */
  18.  
  19. #include <stdio.h>
  20. #include "host.h"
  21. #include <sgtty.h>
  22.  
  23. int get_one()
  24. {
  25.     char c;
  26.     struct sgttyb stty, sttyo;
  27.  
  28.     ioctl(0, TIOCGETP, &stty);
  29.     sttyo = stty;
  30.     stty.sg_flags |= RAW;
  31. #ifdef ECHO
  32.     stty.sg_flags &= ~ECHO;
  33. #endif /* ECHO */
  34.     ioctl(0, TIOCSETP, &stty);
  35.  
  36.     c = fgetc(stdin);
  37.     ioctl(0, TIOCSETP, &sttyo);
  38.  
  39.     return( c );
  40. }
  41.